package com.online_exam.repository;

import com.online_exam.domain.Question;
import com.online_exam.domain.question.QuestionObject;
import com.online_exam.viewmodel.admin.question.QuestionEditVM;
import com.online_exam.viewmodel.admin.question.QuestionPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
@Repository
@Mapper
public interface QuestionMapper {
    //添加题目
    public int insertQuestion(Question question);

    //添加 题目选项，解析等信息
    public int insertQuestionObject(QuestionObject questionObject);

    List<Question> select(QuestionPageRequestVM vm);

    Question getById(Integer id);

    public int deleteById(Integer id);

    public int updateQuestion(Question question);



    List<Question> selectByIds(@Param("ids") List<Integer> ids);
}
